#ifndef REVISION_H
#define REVISION_H

#include <fstream>
#include <string>
#include <stdio.h>

/*
The revision class and subclasses are specific classes
*/

class Revision
{
    // Fields
    protected:
        std::string filename;

    // Methods
    public:
        Revision(std::string f)
        {
            filename = f;
        };
        virtual ~Revision(){};
        virtual std::string get() = 0;
    private:
        virtual bool save() = 0;
        virtual bool read() = 0;
};

class MercurialRevision : public Revision
{
    // Fields
    private:
        std::string revNotation; // Revision notation (not necessarily a number)
        std::string error;

    // Methods
    public:
        MercurialRevision(std::string f);
        virtual ~MercurialRevision(){};
        std::string get();
    private:
        std::string exec(std::string cmd);
        void clean();
        bool save();
        bool read();

};

#endif
